package com.example.emos.api.db.dao;

import cn.hutool.core.date.DateTime;
import com.example.emos.api.controller.form.UpdateTimeForm;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.data.repository.query.Param;

import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;

/**
 * @author ：Supyo
 * @date ：Created in 2021/11/16 15:04
 * @description：
 */
@Mapper
public interface TbMarkDao {

    public ArrayList<HashMap> selectMarkBypages(HashMap param);

    public long count(HashMap param);

    public int selectExamTemplate(Integer examId);

    public Object paper(int templateId);

    public int selectPersonId(Integer markId);

    public String selectPersonName(int personId);

    public String selectRoles(int personId);

    public int selectScoreId(Integer markId);

    public void insertTask(@Param("personId") int personId, @Param("personName") String personName, @Param("scorer") int scorer);

    public HashMap task(Integer markId);

    public int weight(Integer markId);

    public int returnScore(Integer markId, Integer score, double totalScore);

    public int examId(Integer markId);

    public int person(Integer markId);

    public double[] countSum(int examId, int personId);

    public void updateScore(double sumScore, int examId, int personId, String rate);

    public void updateStatus(int id, int status);

    public HashMap selectTime(int examId);

    public int updateTime(DateTime startTime, DateTime endTime, int examId);

    public void updateOptions(Integer markId, Object options);

    public void updateExamStatus(int examId, int status);

    public List selectMarkId(int examId);

    public int getTotalTask(int userId);


//    public void insertTask(int personId, String personName, String scoreName, Object options);
}
